package com.jk11a.shangdaast.user;

import com.jk11a.shangdaast.R;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class LogoutActivity extends Activity {
	private SharedPreferences sp=null;
	private String FILE = "saveUserNamePwd";
	private Button logout_btn;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		logout_btn=(Button)findViewById(R.id.logout_btn1);
		super.onCreate(savedInstanceState);
		setContentView(R.layout.logout);
		sp=this.getSharedPreferences(FILE, Context.MODE_PRIVATE);
		
	}
	public void logout(View v){
		sp.edit().clear().commit(); 
		Intent intent=new Intent();
		intent.setClass(LogoutActivity.this, LoginActivity.class);
		startActivity(intent);
		finish();
	}
}
